package router

import (
	"github.com/kataras/iris/v12"
	"go-movies/controller"
	"go-movies/util"
)

// 用户接口
func UserRouterRegister(app *iris.Application){
	// 用户注册
	app.Post("/user/register", controller.RegisterUser)
	// 用户激活
	app.Get("/user/actived/{id}", controller.UserActived)
	// 用户登录:
	app.Post("/user/login", controller.UserLogin)
	// 获取用户信息
	app.Get("/user/info", util.ValidateJwtMiddleware, controller.GetUserInfo)
}